<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Danh sách môn học</a></li>
		<li class="tabs-course-frm"><a href="#tabs-2"><?php echo $this->titleForm; ?></a></li>
	</ul>
	
	<div id="tabs-1">
	    <form action="<?php echo $this->baseUrl('/admin/course/');?>" method="get" class="frm-data">
	        <p class="search_box">
	            <input class="sbt hover focus" type="text" name="search_box_text"/>
	            <input class="sbc input-hover" type="submit" name="search_box_sumit" value="Tìm lớp"/>
	        </p><!-- End .search_box-->
	         <p class="saporator sf"><br /></p>
	         
	        <div class="table_nav">
	                <div class="table_nav_left">
	                         
	                    <select id="tbn_cat" name="tbn_cate">
	                        <option value="0" selected="selected">Hiển thị tất cả</option>
	                    <?php 
//	                    	foreach ($this->khoaHoc as $khoa) {
//	                    		echo '<option value ="'.$khoa['khoa'].'">Khóa '.$khoa['khoa'].'</option>';
//	                    	}
	                    ?>                 
	                                               
	                    </select>
	                    <input type="submit" value="Lọc" name="tbn_filter" class="tbn_button input-hover"/> <!-- tbn: là viết tắt của từ table_nav trong div class="table_nav" -->
	                    <input type="submit" value="Xóa" name="del" class="tbn_button input-hover"/>
	                </div><!-- end .table_nav_left -->
	                <div class="table_nav_pages">  
	                <?php 
	                	//phan trang
						echo $this->paginationControl($this->paginatorCourse,'sliding','paginator.phtml');
					?>                           
	                </div>
	            </div><!-- End .table_nav-->
	        <table id="p_post">
	            <thead>
	                <tr>
	                    <th class="col-1-course"><input class="check-all" type="checkbox" /></th>
	                    <th class="col-2-course">Môn học</th>
	                    <th class="col-3-course">Xem các bài kiểm tra của môn</th>
	                    <th class="col-4-course">Thêm câu hỏi vào ngân hàng đề thi</th>
	                </tr>
	            </thead>
	            <tbody>
	            <?php 
	            	foreach ($this->paginatorCourse as $course){
	            ?>   
	            
	                <tr>
	                    <th class="col-1-course">
	                        <input class="sub-check" name="course-check[]" type="checkbox" value="<?php echo $course['id'];?>"/>
	                    </th>
	                    <th class="col-2-course post_title">
	            			<strong><a href="" class="title_ct"><?php echo $course['tenMonHoc'];?></a></strong> 
		                    <div class="row_action">
		                        <span class="row_edit">
		                        	<a href="<?php echo $this->baseUrl('/admin/course/?edit&id='.$course['id']);?>">Sửa</a>|
		                        </span>
		                        <span class="row_del">
		                        	<a href="<?php echo $this->baseUrl('/admin/course/delete/?delete&id='.$course['id']);?>">Xóa</a>
		                        </span>                        
		                    </div>        
	            		</th>
	                    <th class="col-3-course post_title">
	                        <i><a href="<?php echo $this->baseUrl('admin/quiz/addquestion/');?>" class="title_ct">Xem</a></i> 
	                    </th>
	                    
	                    <th class="col-4-course">
	                    	<i><a href="<?php echo $this->baseUrl('admin/question/');?>" class="title_ct">Thêm câu hỏi</a></i> 
	                    </th>
	                </tr>                                          
	            <?php 
	            	}
	            ?>             
	            </tbody>
	            <tfoot>
	                <tr>
	                    <th class="col-1-course"><input class="check-all" type="checkbox" /></th>
	                    <th class="col-2-course">Môn học</th>
	                    <th class="col-3-course">Xem các bài kiểm tra của môn</th>
	                    <th class="col-4-course">Thêm câu hỏi vào ngân hàng đề thi</th>               
	                </tr>
	            </tfoot>
	        </table>
	                
	    </form>
	</div>
	
	<div id="tabs-2">
		<div class="courseForm">
			<center>
			<?php
				echo $this->courseForm;
			?>	
			</center>
		
		</div>
	</div>
</div>

<script type="text/javascript">
    $(document).ready(function(){
        $.extend({
            getUrlVars: function(){
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for(var i = 0; i < hashes.length; i++){
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            },
            getUrlVar: function(name){
                return $.getUrlVars()[name];
            }
        });
        
        paramSelect = $.getUrlVar('id');
        //alert(paramSelect);
        if(paramSelect !=null){
            $('#tabs-1').addClass('ui-tabs-hide');
            $('.ui-state-active').removeClass('ui-tabs-selected ui-state-active');
            
            $('.tabs-course-frm').addClass('ui-tabs-selected ui-state-active');            
            $('#tabs-2').removeClass('ui-tabs-hide');
            
        }
       
    });
</script>